import 'package:flutter/material.dart';
import 'package:flutter_juwo/common/common_index.dart';
import 'package:flutter_juwo/ui/utils/utils.dart';

///************************
/// @auther nb
/// @function 基础信息
/// @创建日期 2019/8/2 9:35
///************************
class BasicInfo extends StatefulWidget {
  @override
  _BasicInfoState createState() => _BasicInfoState();
}

class _BasicInfoState extends State<BasicInfo> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.fromLTRB(
          ScreenUtil().setWidth(30),
          ScreenUtil().setWidth(30),
          ScreenUtil().setWidth(30),
          ScreenUtil().setWidth(30)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Container(
            child: Text(
              "基础信息",
              style: TextStyles.custom(
                  28, Colours.appC1, Font.PingFangBlod),
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
            child: Row(
              children: <Widget>[
                Container(
                  child: Text("关键词：", style: getTextStyle()),
                  width: ScreenUtil().setWidth(150),
                ),
                Container(
                  child: Text("连衣裙 女", style: getTextStyle()),
                ),
                Expanded(
                  flex: 1,
                  child: GestureDetector(
                    onTap: () {},
                    child: Container(
                      alignment: Alignment.centerRight,
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.end,
                        children: <Widget>[
                          Text(
                            "搜索不到，换一个试试",
                            style: TextStyles.custom(24, Color(0xFF508cff),
                                Font.PingFangMedium),
                          ),
                          Container(
                            child: Image.asset(
                              Utils.getImgPath("icon_refresh"),
                              width: ScreenUtil().setWidth(26),
                              height: ScreenUtil().setWidth(26),
                            ),
                          )
                        ],
                      ),
                    ),
                  ),
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
            child: Row(
              children: <Widget>[
                Container(
                  child: Text("展示金额：", style: getTextStyle()),
                  width: ScreenUtil().setWidth(150),
                ),
                Container(
                  child: Text("298元", style: getTextStyle()),
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
            child: Row(
              children: <Widget>[
                Container(
                  child: Text("产品所在地：", style: getTextStyle()),
                  width: ScreenUtil().setWidth(150),
                ),
                Container(
                  child: Text("杭州", style: getTextStyle()),
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
            child: Row(
              children: <Widget>[
                Container(
                  child: Text("付款人数：", style: getTextStyle()),
                  width: ScreenUtil().setWidth(150),
                ),
                Container(
                  child: Text("214人", style: getTextStyle()),
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
            child: Row(
              children: <Widget>[
                Container(
                  child: Text("价格区间：", style: getTextStyle()),
                  width: ScreenUtil().setWidth(150),
                ),
                Container(
                  child: Text("321-197", style: getTextStyle()),
                ),
              ],
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: ScreenUtil().setWidth(30)),
            child: Row(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Container(
                  child: Text("步骤说明：", style: getTextStyle()),
                  width: ScreenUtil().setWidth(150),
                ),
                Expanded(
                  flex: 1,
                  child: Container(
                    child: Text("有10元优惠券，需要领下，展示价格298元；实际付款金额288元，找到商品直接拍下即可;",
                        maxLines: 5, style: getTextStyle()),
                  ),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }

  getTextStyle() {
    return TextStyles.custom(
        24, Color(0xFF666666), Font.PingFangMedium);
  }
}
